// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App.vue'

// 导入路由的包
import router from './router'
// 安装路由
Vue.use(router)


// 导入格式化时间的插件
import moment from 'moment'
// 定义全局的时间过滤器
Vue.filter('dateFormat',function(dataStr,pattern = "YYY-MM-DD HH:mm:ss"){
    return moment(dataStr).format(pattern)
})



// 导入vue-resource
import VueResource from 'vue-resource'
Vue.use(VueResource)
// 设置请求根路径
Vue.http.options.root = 'http://vue.studyit.io'



import MintUI  from 'mint-ui'
import 'mint-ui/lib/style.css'
import 'mui/css/mui.min.css'
import 'mui/css/icons-extra(1).css'

// 按需导入mint-ui中的组件
import {Header,Swipe,SwipeItem} from 'mint-ui'
Vue.component(Header.name,Header)
Vue.component(Swipe.name,Swipe)
Vue.component(SwipeItem.name,SwipeItem)



// Vue.use(MintUI)全局注册


Vue.config.productionTip = false

/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  components: { App },
  template: '<App/>'
})
